<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCommissionLogTable extends Migration
{
    /**
     * Run the migrations.
     * 下级提现，返佣金流水表
     * @return void
     */
    public function up()
    {
        Schema::create('commission_log', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->comment('收入用户');
            $table->integer('inferior_id')->comment('下级提现用户');
            $table->decimal('money',10,4)->comment('返给上级的佣金');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('commission_log');
    }
}
